The Slider Component > FSlider.setValue()

 

FSlider.setValue()

Availability

Flash Player 6.

Usage

mySlider_sld.setValue (value)

Parameters

value A number specifying the value of the slider.

Returns


Nothing

Description

Specifies the value of the slider. The value will be restricted to the maximum and minimum values.The thumb cursor for the slider will be updated to reflect the new value. If snapping is enabled the value will be snapped to the appropriate tick value.

Example

The slider_getIntValue.fla example file contains an example of using this method.

The following code sets the value of the slider to 50 and then retrieves the value and traces it.

mySlider_sld.setValue(50);
trace( "Value: " + mySlider_sld.getValue() );//traces 50

See also

FSlider.getIntValue()

FSlider.getValue()